<template>
	<view>
		<tui-tabbar
		:current="current"
		:color="color"
		:selectedColor="selectedColor"
		:backgroundColor="backgroundColor"
		:badgeBgColor="badgeBgColor"
		:tabBar="tabBar"
		@click="click"
		></tui-tabbar>
		</view>
</template>

<script>
export default {
	props: {
		current: 0
	},
	data() {
		return {
			color: 'black',
			selectedColor: '#4caf50',
			backgroundColor: '#ffffff',
			badgeBgColor: '#4caf50',
			tabBar: [
				{
					pagePath: '/pages/chat/chat',
					text: 'JIM',
					iconPath: '/static/text.png',
					selectedIconPath: '/static/text-selected.png',
					num:'1',
					show:true
				},
				{
					pagePath: '/pages/contacts/contacts',
					text: '通讯录',
					iconPath: '/static/contacts.png',
					selectedIconPath: '/static/contacts-selected.png',
					num:'',
					show:true,
					show:true
				},
				{
					pagePath: '/pages/discover/discover',
					text: '发现',
					iconPath: '/static/discover.png',
					selectedIconPath: '/static/discover-selected.png',
					num:'',
					show:true
				},
				{
					pagePath: '/pages/me/me',
					text: '我',
					iconPath: '/static/me.png',
					selectedIconPath: '/static/me-selected.png',
					num:'',
					show:true
				}
			]
		};
	},
	methods: {
		click(index, hump, pagePath, verify) {
			var tempPage = index.pagePath
			uni.redirectTo({
			    url: tempPage
			});
		}
	},created() {
		this.tabBar[2].show =this.ImConfig.discoverPage.show
	}
};
</script>

<style></style>
